Page({
  data: {
    content:``,
  },
  onLoad(options){
    this.getNoticeDetail(options._id);
  },
  getNoticeDetail(_id){
    wx.showLoading({
      title: '正在加载',
    });
    wx.cloud.callFunction({
      name: 'main',
      config: {
        env: this.data.envId
      },
      data: {
        type: "instruction",
      }
    }).then((resp) => {
      // console.log(resp);
      this.setData({
        video: resp.result.data[0].instruction_video,
        text: resp.result.data[0].instruction_text,
      });
      wx.hideLoading();
    }).catch((e) => {
      console.log(e);
      wx.hideLoading();
    });
  }
})
